package com.xzh.springCloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Author: zhiHong
 * @CreateTime: 2023-08-24 21:57
 * @Description: 自定义bean类
 */
@Configuration
public class CustomizationBean {
    /**
     * 配置注入 RestTemplate bean 对象
     */
    @Bean
    @LoadBalanced
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }
}
